<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="common/tag.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <title>秒杀详情页</title>
    <%@include file="common/head.jsp" %>
</head>
<body>

    <div class="container">
        <div class="pannel pannel-default text-center">
            <div class="pannel-heading">
                <h1>${seckill.name}</h1>
            </div>
        </div>
        <div class="pannel-body">
            <h2 class="text-center">
                <!-- 显示time图标 -->
                <span class="glyphicon glyphicon-time"></span>
                <span class="glyphicon" id = "seckill-box"></span>
            </h2>
        </div>
    </div>
    <!-- 弹出层，输入电话号码 -->
    <div id="killPhoneModal" class="modal false">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h3 class="modal-title text-center">
                        <span class="glyphicon glyphicon-phone"></span>
                    </h3>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <div class="col-xs-8 col-xs-offset-2">
                            <input type="text" name="killPhone" id="killPhoneKey" placeholder="填写手机号"
                                   class="form-control"/>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <span id="killPhoneMessage" class="glyphicon"></span>
                    <button type="button" id="killPhoneBtn" class="btn btn-success">
                        <span class="glyphicon glyphicon-phone"></span>
                        Submit
                    </button>
                </div>
            </div>
        </div>
    </div>
</body>
<%@include file="common/foot.jsp" %>
<script src="/resource/script/seckill.js" type="text/javascript" ></script>
<script type="text/javascript">

    $(function(){
        // 使用EL表达式传入参数,初始化逻辑
        seckill.detail.init({
            seckillId : ${seckill.seckillId},
            startTime : ${seckill.startTime.time},  // 使用毫秒进行处理
            endTime : ${seckill.endTime.time}
        });
    });

</script>
</html>
